---
title: "Set Primary"
"og:title": "dub.domains.setPrimary - Set a domain as primary - TypeScript SDK"
description: "Set a domain as primary for the authenticated workspace."
---

import DomainResponse from "/snippets/domain-response.mdx";

## Arguments

<ParamField body="slug" type="string" required>
  Name of the domain to set as primary. Eg. `acme.com`.
</ParamField>

## Response

<DomainResponse />

<RequestExample>

```ts
await dub.domains.setPrimary("acme.com");
```

</RequestExample>

<ResponseExample>

```ts
{
  id: "clvcep2sn87jh8nf808x00005",
  slug: "acme.com",
  verified: false,
  primary: true,
  archived: false,
  placeholder: "https://dub.co/help/article/what-is-dub",
  expiredUrl: "https://acme.com/expired",
  target: "https://acme.com/home",
  type: "redirect",
  clicks: 0,
}
```

</ResponseExample>
